import { RouteRecordRaw, createRouter, createWebHistory,createWebHashHistory } from 'vue-router';
import { App } from 'vue'
// import { createRouterGuards } from "./router-guards"

const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        name: 'Home',
        component: () => import('../view/HomeView.vue')
    },
    {
        path: '/about',
        name: 'About',
        component: () => import('../view/AboutView.vue')
    },
    {
        path:'/pinia',
        name:'Pinia',
        component:()=>import('../view/pinia.vue')
    }
    // {
    //     path: '/login',
    //     name: 'Login',
    //     component: () => import('../view/Login.vue')
    // },
    ]


const router = createRouter({
    history: createWebHistory(),   //createWebHistory(), createWebHashHistory
    routes
})

// export function setupRouter(app: App) {
//     createRouterGuards(router, routes)
//     app.use(router)
//   }

export default router